import {
	createSSRApp
} from "vue";
import App from "./App.vue";

// 引入 Vant 组件
import { 
	Button,
	Field,
	Cell,
	CellGroup,
	Toast,
	Dialog,
	Loading,
	Icon,
	Popup,
	Overlay,
	NavBar,
	Tabbar,
	TabbarItem,
	Form,
	Checkbox,
	CheckboxGroup,
	Radio,
	RadioGroup,
	Switch,
	Stepper,
	Rate,
	Slider,
	Uploader,
	Progress,
	Circle,
	Tag,
	Badge,
	NoticeBar,
	Swipe,
	SwipeItem,
	Grid,
	GridItem,
	Image as VanImage,
	Lazyload,
	List,
	PullRefresh,
	Sticky,
	IndexBar,
	IndexAnchor,
	TreeSelect,
	Card,
	SubmitBar,
	Skeleton,
	SkeletonTitle,
	SkeletonImage,
	SkeletonAvatar,
	SkeletonParagraph,
	Divider,
	Empty,
	Calendar,
	DatePicker,
	Picker,
	Popover,
	ActionSheet,
	ShareSheet,
	ContactCard,
	ContactList,
	ContactEdit,
	CouponCell,
	CouponList,
	AddressEdit,
	AddressList,
	Area,
	Col,
	Row,
	ImagePreview,
	SwipeCell,
	DropdownMenu,
	DropdownItem,
	Tabs,
	Tab,
	Sidebar,
	SidebarItem,
	Pagination,
	ConfigProvider,
	FloatingBubble,
	Locale,
	BackTop 
} from 'vant'

// 引入 Vant 样式
import 'vant/lib/index.css'

export function createApp() {
	const app = createSSRApp(App);
	
	// 注册 Vant 组件
 

	app.use(Button)
	app.use(BackTop)
	app.use(FloatingBubble)
	app.use(Field)
	app.use(Cell)
	app.use(CellGroup)
	app.use(Toast)
	app.use(Dialog)
	app.use(Loading)
	app.use(Icon)
	app.use(Popup)
	app.use(Overlay)
	app.use(NavBar)
	app.use(Tabbar)
	app.use(TabbarItem)
	app.use(Form)
	app.use(Checkbox)
	app.use(CheckboxGroup)
	app.use(Radio)
	app.use(RadioGroup)
	app.use(Switch)
	app.use(Stepper)
	app.use(Rate)
	app.use(Slider)
	app.use(Uploader)
	app.use(Progress)
	app.use(Circle)
	app.use(Tag)
	app.use(Badge)
	app.use(NoticeBar)
	app.use(Swipe)
	app.use(SwipeItem)
	app.use(Grid)
	app.use(GridItem)
	app.use(VanImage)
	app.use(Lazyload,{
		lazyComponent:true
	})
	app.use(List)
	app.use(PullRefresh)
	app.use(Sticky)
	app.use(IndexBar)
	app.use(IndexAnchor)
	app.use(TreeSelect)
	app.use(Card)
	app.use(SubmitBar)
	app.use(Skeleton)
	app.use(SkeletonTitle)
	app.use(SkeletonImage)
	app.use(SkeletonAvatar)
	app.use(SkeletonParagraph)
	app.use(Divider)
	app.use(Empty)
	app.use(Calendar)
	app.use(DatePicker)
	app.use(Picker)
	app.use(Popover)
	app.use(ActionSheet)
	app.use(ShareSheet)
	app.use(ContactCard)
	app.use(ContactList)
	app.use(ContactEdit)
	app.use(CouponCell)
	app.use(CouponList)
	app.use(AddressEdit)
	app.use(AddressList)
	app.use(Area)
	app.use(Col)
	app.use(Row)
	app.use(ImagePreview)
	app.use(SwipeCell)
	app.use(DropdownMenu)
	app.use(DropdownItem)
	app.use(Tabs)
	app.use(Tab)
	app.use(Sidebar)
	app.use(SidebarItem)
	app.use(Pagination)
	app.use(ConfigProvider)
	app.use(Locale)

	return {
		app,
	};
}
